Conventional devices with attached capacitors allow capacitors to be inserted into a plurality of holes created in a metal block (see Patent Document 1). In addition, there have been capacitor devices where a capacitor provided with a thermal contracting resin tube around it is attached to a holder having a housing section of which the upper surface is open and the cross-section is in arc form, and the resin tube is heated in a state where the resin tube has been pulled out to the outside through the opening of the holder so as to contract, and thus, the capacitor is held in place (see Patent Document 2).